<script setup lang="ts">import {onMounted, reactive, watch} from "vue";import {readTextFile} from "@tauri-apps/plugin-fs";import {marked} from "marked";import {getRenderer} from "../../../../utils/MarkdownUtil.ts";const props = defineProps<{  filePath: string}>();marked.setOptions({  breaks: true,  gfm: true,  renderer: getRenderer(props.filePath)});const fileData = reactive({  content: '',          // 文件内容  originalContent: '',  // 原始文件内容})/** * 加载文件信息 */async function loadFileInfo() {  fileData.originalContent = await readTextFile(props.filePath);  fileData.content = await marked(fileData.originalContent);}watch(() => props.filePath, loadFileInfo)onMounted(loadFileInfo)</script><template>  <div v-html="fileData.content" class="markdown-container"/></template><style scoped>.markdown-container {  width: 100%;  height: 100%;  overflow-y: auto;}</style>